home *** CD-ROM | disk | FTP | other *** search
/ Chip: Hang es video / CHIP_ZENESZERKESZTO_2005.ISO / audio_3 / visual / robotfunk / setup.exe / {app} / main.dxr / ui_32.ls < prev    next >
Encoding:
Text File  |  2003-11-19  |  1.3 KB  |  50 lines

  1. global vidlist, vidcount, import, grabrect, preloadlist, select, lstgoodframe, fpslist, currentfps, curscript, midipause, ginsprite, emptyframe, mytype
  2.  
  3. on snap
  4.   curscript = "snap"
  5.   blnk = image(grabrect.width, grabrect.height, 32)
  6.   blnk.copyPixels(import.image, grabrect, grabrect)
  7.   if blnk <> emptyframe then
  8.     vidcount = vidcount + 1
  9.     vidlist[vidcount] = blnk
  10.     if vidcount > 1 then
  11.       if vidlist[vidcount] = vidlist[lstgoodframe] then
  12.         vidlist[vidcount] = vidlist[lstgoodframe]
  13.       else
  14.         lstgoodframe = vidcount
  15.       end if
  16.     end if
  17.   end if
  18. end
  19.  
  20. on grabfinished
  21.   curscript = "grabfin"
  22.   member("slott").image = member("origslot").image
  23.   if select = 0 then
  24.     select = getselect()
  25.   end if
  26.   lstgoodframe = 1
  27.   preloadlist[select] = vidlist
  28.   vidlist = []
  29.   vidcount = 0
  30.   midframe = max(preloadlist[select].count / 2, 1)
  31.   selmem = member(select, "thumbnails")
  32.   slot = member("slot", "ui")
  33.   thumb = preloadlist[select][midframe]
  34.   selmem.image.copyPixels(thumb, selmem.rect, thumb.rect)
  35.   selmem.image.copyPixels(slot, slot.rect, thumb.rect, [#ink: 36])
  36.   fpslist[select] = currentfps
  37. end
  38.  
  39. on getselect
  40.   repeat with i = 1 to 24
  41.     if [0, []] contains vidlist[i] then
  42.       select = i
  43.       exit repeat
  44.     end if
  45.   end repeat
  46.   if select = 0 then
  47.     select = 1
  48.   end if
  49. end
  50.